<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017-8-28
 * Time: 15:00:14
 */

namespace app\admin\validate;


use think\Validate;

class Reward extends Validate
{
    protected $rule = [
        'name'          =>      'require',
        'number'        =>      'require|number|gt:0',
        'sort'          =>      'number',
        'current_number'=>      'number',
        'tip_text'      =>      'require',
    ];

    protected $message = [
        'name.require'      =>      '奖品名称必填',
        'number.require'    =>      '奖品数量必填',
        'number.number'     =>      '奖品数量要为整数',
        'number.gt'         =>      '奖品数量要大于0',
        'sort.number'       =>      '排序值要为整数',
        'current_number.number'=>   '剩余奖品数量要为整数',
        'tip_text.require'  =>      '奖品提示语必填',
    ];
}